if (GetRealmName() ~="Project Defiance") then 
print ("|cff6AFF00Please note, Divinity-X Assistant was not designed for the server you are on. It will not function as intended."); else
print("|cff6AFF00Loaded Divinity-X Assistant v"..GetAddOnMetadata("Divinity-X Assistant","Version")..".|r");
end

function HideAddon()
Main_Form:Hide();
Item_Form:Hide();
end






--SendAddonMessage("DXA","GetCurVer","WHISPER",GetUnitName("target"));
--local n=CreateFrame("frame");n:SetScript("OnEvent",func);n:RegisterEvent("CHAT_MSG_ADDON");
--local function func(self,event,title,msg,channel,sender) SendAddonMessage("DXA",GetAddOnMetadata("Divinity-X Assistant","Version"),"WHISPER",sender); end

-- ITEM FORM -- 
function Add_Item()
if ItemNumber:GetText() == "" and ItemQuantity1:GetText() == "" then
UIErrorsFrame:AddMessage("Please specify a Item Entry ID or quantity!");
else
SendChatMessage(".additem "..ItemNumber:GetText().." "..ItemQuantity1:GetText()); 
end
end


function AddItemSet()
if ItemSetNumber:GetText() == "" then
UIErrorsFrame:AddMessage("Please enter an item set ID!");
else
SendChatMessage(".additemset "..ItemSetNumber:GetText());    
end
end

function GoldTooltip()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("|cffCDAD00Gold|r");
GameTooltip:Show();
end

function SilverTooltip()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("|cffC0C0C0Silver|r");
GameTooltip:Show();
end

function CopperTooltip()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("|cffC96333Copper|r");
GameTooltip:Show();
end

function ItemQuantityTooltip()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("|cff6AFF00Leave blank for 1.|r");
GameTooltip:Show();
end



